<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="generator" content=""/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href="/static/css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print"/>
    <link href="/static/css/print.css" rel="stylesheet" type="text/css" media="print"/>
    <script src="/static/js/jquery-1.10.1.min.js"></script>
    <script src="/static/js/side.js" type="text/javascript"></script>

    <!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
</head>

<body>


<!-- MainForm -->
<div id="MainForm">
    <div class="form_boxA">
        <h2>学生信息列表</h2>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <th>序号</th>
                <th>学生名称</th>
                <th>班级</th>
                <th>头像</th>
                <th>操作</th>
            </tr>
            {% for page in pages %}
            <tr>
                <td>{{ page.id }}</td>
                <td>{{ page.s_name }}</td>
                <td>{{ page.g.g_name }}</td>
                <td><img src="/media/{{ page.s_img }}" width='50' height="50"></td>
                <td><a href="{% url 'app:delete' %}?id={{ page.id }}">删除</a></td>
            </tr>
            {% endfor %}
        </table>
        <p class="msg">共找到{{ total }}学生记录</p>
    </div>

    <ul id="PageNum">

        <li><a href="{% url 'app:student' %}">首页</a></li>
        {% if pages.has_previous %}
        <li><a href="{% url 'app:student' %}?page_num={{ pages.previous_page_number }}">上一页</a></li>
        {% endif %}
        {% for i in pages.paginator.page_range %}
        <li><a href="{% url 'app:student' %}?page_num={{ i }}">{{ i }}</a></li>
        {% endfor %}
        {% if pages.has_next %}
        <li><a href="{% url 'app:student' %}?page_num={{ pages.next_page_number }}">下一页</a></li>
        {% endif %}
        <li><a href="{% url 'app:student' %}?page_num={{ pages.paginator.num_pages }}">尾页</a></li>
        <li>当前第{{ pages.number }}页</li>
    </ul>

</div>

</body>
</html>